package xyz.weizhi.tanhua.appserver.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.weizhi.tanhua.appserver.service.TanhuaService;
import xyz.weizhi.tanhua.model.Dto.RecommendUserDto;
import xyz.weizhi.tanhua.model.vo.PageResult;
import xyz.weizhi.tanhua.model.vo.TodayBest;

/**
 * @Author milian
 * @Date 2021/10/24 0024 19:44
 */
@RestController
@RequestMapping("/tanhua")
public class TanhuaController {
    @Autowired
    private TanhuaService tanhuaService;
    /*
        今日佳人
     */
    @GetMapping("/todayBest")
    public ResponseEntity todayBest(){
        TodayBest todayBest = tanhuaService.todayBest();
        return ResponseEntity.ok(todayBest);
    }
    /*
        推荐朋友
     */
    @GetMapping("/recommendation")
    public ResponseEntity recommendation(RecommendUserDto recommendUser){
        PageResult pageResult= tanhuaService.recommendation(recommendUser);
        return ResponseEntity.ok(pageResult);
    }
}
